<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
</head>

<body>
<?php
include "../configdb.php";
$cus_name = $_POST['cus_name'];

$file_name = $_FILES['cus_map']['name'];
$tmp_name = $_FILES['cus_map']['tmp_name'];

$path_save_file = '../images_upload/';
move_uploaded_file ($tmp_name, $path_save_file.$file_name);


echo $sql = "update customet set cus_name='$cus_name','$cus_add','$cus_amper','$cus_city','$cus_zip','$cus_tel','$cus_email','$cus_map' where cus_id='$cus_id'";
		 
	 
$query=mysql_db_query($dbname,$sql);

echo $query;
if($query)
{?>
<script>
alert("แำก้ไขเรียบร้อยแล้ว");
</script>
<?
print "<meta http-equiv='refresh' content='1;url=show2edit_cus.php?cus_id='$cus_id'>" ;
}
else{
?>
<script>
alert("แก้ไขไม่ได้");
</script>

<?
print "<meta http-equiv='refresh' content='1;url=customers.php'>" ;
}



?>

</body>
</html>
